		{if $action eq 'register'}
		<h2>{$lang.register_title}</h2>
		{if $errors}
		<div>
			<ul>
				{foreach from=$errors item=err}
				<li>{$err}</li>
				{/foreach}
			</ul>
		</div>
		{/if}
		<form method="post" action="/registrar">
			<div>
				<div>
					<label>{$lang.user}</label><br />
					{$lang.user_constraints}
				</div>
				<div>
					<input type="text" name="login" value="{$user->getLogin()}"/>
				</div>
			</div>

			<div>
				<div>
					<label>{$lang.email}</label><br />
					{$lang.user_email_constraints}
				</div>
				<div>
					<input type="text" name="email" value="{$user->getEmail()}"/>
				</div>
			</div>

			<div>
				<div>
					<label>{$lang.pass}</label>
				</div>
				<div>
					<input type="password" name="password" />
				</div>
			</div>

			<div>
				<div>
					<label>{$lang.pass_repeat}</label>
				</div>
				<div>
					<input type="password" name="password2" />
				</div>
			</div>

			<div>
				<div>
					<label>{$lang.captcha}</label>
				</div>
				<div>
					<img src="/z-content/img/captcha.php" id="captcha" alt="captcha" /><br />
					<input type="text" name="captcha" />
				</div>
			</div>

			<div>
				<div>&nbsp;</div>
				<div>
					{$lang.use_terms} <input type="checkbox" name="legal" value="ok" />
				</div>
			</div>

			<div>
				<div>&nbsp;</div>
				<div>
					<button type="submit">
						{$lang.send}
					</button>
				</div>
			</div>

		</form>

		{elseif $action eq 'login'}

		<h2>{$lang.login}</h2>
		{if $errors}
		<div>
			<ul>
				{foreach from=$errors item=err}
				<li>{$err}</li>
				{/foreach}
			</ul>
		</div>
		{/if}
		<form method="post" action="/index.php?c=user&amp;a=auth">
			<div>
				<div>
					<label>{$lang.user}</label>
				</div>
				<div>
					<input type="text" name="login" />
				</div>
			</div>

			<div>
				<div>
					<label>{$lang.pass}</label>
				</div>
				<div>
					<input type="password" name="password" />
				</div>
			</div>

			{if $captcha}
			<div>
				<div>
					<label>{$lang.captcha}</label>
				</div>
				<div>
					<img src="/z-content/img/captcha.php" id="captcha" alt="captcha" /><br />
					<input type="text" name="captcha">
				</div>
			</div>
			{/if}

			<div>
				<div>&nbsp;</div>
				<div>
					<input type="checkbox" name="persistent" class="checkbox" />
					{$lang.remember}
				</div>
			</div>

			<div>
				<div>&nbsp;</div>
				<div>
					<button type="submit">
						{$lang.send}
					</button>
				</div>
			</div>
		</form>

		<h4><a href="/index.php?c=user&amp;a=register">{$lang.register_tooltip_title}</a></h4>
		<p>{$lang.register_tooltip_text}</p>

		<h4><a href="/index.php?c=user&amp;a=recover">{$lang.recover_tooltip_title}</a></h4>
		<p>{$lang.recover_tooltip_text}</p>

		{elseif $action eq 'show'}
		<h2>{$lang.profile}: {$user_obj->getLogin()}</h2>
		<div>
			{if $user_obj->getLogin() eq $user}
			<a href="/index.php?c=user&amp;a=edit">{$lang.edit}</a><br />
			{/if}
			{$lang.user_since} {$user_obj->getRegisterDate()}<br />
			{if $user_obj->getAvatar()}
			<img src="/img/avatars/{$user_obj->getId()}.jpg" alt="{$user_obj->getLogin()}" />
			{else}
			<img src="/img/avatars/0.jpg" alt="{$user_obj->getLogin()}" />
			{/if}
		</div>

		{elseif $action eq 'edit'}
		<h2>{$lang.edit}: {$user_obj->getLogin()}</h2>
		{if $errors}
		<div>
			<ul>
				{foreach from=$errors item=err}
				<li>{$err}</li>
				{/foreach}
			</ul>
		</div>
		{/if}

		<form enctype="multipart/form-data" method="post" action="/index.php?c=user&amp;a=update">
			<div>
				<div>
					<label>{$lang.pass}</label>
				</div>
				<div>
					<input type="password" name="password" />
				</div>
			</div>
			<div>
				<div>
					<label>{$lang.pass_repeat}</label>
				</div>
				<div>
					<input type="password" name="password2" />
				</div>
			</div>
			<div>
				<div>
					<label>{$lang.avatar}</label>
					{$lang.avatar_constraints}
				</div>
				<div>
					<input type="file" name="avatar" />
				</div>
			</div>
			<div>
				<div>&nbsp;
				</div>
				<div>
					<input type="checkbox" name="del_avatar" value="1" >
						{$lang.avatar_delete}
					</input>
				</div>
			</div>
			<div>
				<div>
					&nbsp;
				</div>
				<div>
					<button type="submit">
						{$lang.send}
					</button>
				</div>
			</div>
		</form>

		{elseif $action eq 'recover'}
		<h2>{$lang.recover_title}</h2>

		<form action="index.php?c=user&amp;a=recover" method="post">
			<div>
				<div>
					<label>{$lang.email}</label>
				</div>
				<div>
					<input type="text" class="text" name="email" />
				</div>
			</div>

			<div>
				<div>
					<label>{$captcha}</label>
				</div>
				<div>
					<img src="/z-content/img/captcha.php" id="captcha" alt="captcha" /><br />
				<input name="captcha" />
				</div>
			</div>

			<div class="form_row">
				<div>&nbsp;</div>
				<div>
					<button type="submit">
						{$lang.send}
					</button>
				</div>
			</div>
		</form>

		{/if}